//自定义封装按钮
import 'package:flutter/material.dart';

class Primaybottomsheet extends StatelessWidget {
  final String text;
  final String confirmtext;
  final String canceltext;
  final confirmPressed;
  final cancelPressed;

  
  Primaybottomsheet({Key key, this.text,this.confirmtext,this.canceltext, this.confirmPressed,this.cancelPressed })
      : super(key: key);
  

  @override
  Widget build(BuildContext context) {
    return Padding(
              padding: new EdgeInsets.fromLTRB(0, 0, 0, 0),
              child: Container(
                height: 130,
                child: new Column(children: <Widget>[
                  new Container(
                      decoration: new BoxDecoration(
                          border: Border(
                              bottom: BorderSide(
                                  width: 1, color: Color(0xffe5e5e5)))),
                      height: 50,
                      child: Center(
                          child: Text(text,
                              style: TextStyle(fontSize: 16)))),
                  new Container(
                      decoration: new BoxDecoration(
                          border: Border(
                              bottom: BorderSide(
                                  width: 1, color: Color(0xffe5e5e5)))),
                      height: 40,
                      child: new GestureDetector(
                          behavior: HitTestBehavior.opaque,
                          onTap: confirmPressed,
                          // onTap: () async {
                          //   // Navigator.pop(context);
                           
                          // },
                          child: Center(
                              child: Text(confirmtext,
                                  style: TextStyle(
                                      fontSize: 16, color: Colors.red))))),
                  new Container(
                      height: 40,
                      child: new GestureDetector(
                          behavior: HitTestBehavior.opaque,
                          onTap: cancelPressed,
                          // onTap: () {
                          //   Navigator.pop(context);
                          // },
                          child: Center(
                              child:
                                  Text(canceltext, style: TextStyle(fontSize: 16))))),
                ]),
              ));
  }
}
